#ifndef _AS_BULLET_H_
#define _AS_BULLET_H_

#include "ASEntity.h"
NS_AS_BEGIN

class ASBullet:public ASEntity
{
public:
	enum BulletAttrEnum{//store in ASEntityInitData
		Bullet_Damage,
	};
	enum BulletDamgeTypeTag{
		BulletDamageType_Single,
		BulletDamageType_Arena,
	};
	enum BulletAimTypeTag{
		BulletAimType_Target,//follow target pos
		BulletAimType_Direct,//run on direct with velicity
	};
	ASBullet(int senderID,int targetID,int nAttrsNumI = 0,int nAttrsNumF = 0);
	virtual ~ASBullet();
	virtual void update(float dt) override{};
	virtual void updateData() override{_bSenderValid = false;_bTargetValid = false;_pSender = nullptr;_pTarget = nullptr;};//reset target valid
	virtual ASEntity* getSender();
	virtual ASEntity* getTarget();
	int	getSenderID();
	int getTargetID();
protected:
	int	_iSenderID;
	int _iTargetID;
	ASEntity* _pSender;
	ASEntity* _pTarget;
	bool _bSenderValid;
	bool _bTargetValid;
	float _fLifeTick;
	
};

NS_AS_END
#endif